package com.yanyilu.jianjian.entity;

import com.yanyilu.jianjian.util.TimeUtil;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.Proxy;

import javax.persistence.*;

/**
 * @author java11
 */
@Proxy(lazy = false)
@DynamicUpdate
@DynamicInsert
@Data
@Entity
@org.hibernate.annotations.Table(appliesTo = "tb_activity", comment = "活动")
@Table(name = "tb_activity")
public class Activity {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer activityId;

    @Column(nullable = false,columnDefinition = "varchar(32) comment '活动名'")
    private String activityName;

    @Column(nullable = false,columnDefinition = "longtext comment '活动图片'")
    private String fakeimg;

    @Column(nullable = false,columnDefinition = "longtext comment '活动文本'")
    private String fakecontent;

    @Column(nullable = false,columnDefinition = "longtext comment '活动内容'")
    private String activityContent;

    @Column(nullable = false,columnDefinition = "longtext comment '活动封面图'")
    private String activityImg;

    @Column(nullable = false,columnDefinition = "int(1) comment '样式标签（0：商铺 1：活动）'")
    private Integer typeStyle = 1;

    @Column(nullable = false,columnDefinition = "int(10) comment '创建时间'")
    private Integer creatTime = TimeUtil.getTime();
}
